home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#49 (Oct 89)
/
DMP Source
/
src
/
DMP-110.rsrc.r
< prev
next >
Wrap
Text File
|
1989-01-02
|
13KB
|
640 lines
/*
* The contents of a Macintosh Printer Resource File can be found
* in the Print Manager Chapter of Inside Macintosh, if you can
* get it.
*/
/*
* This file is part of the DMP-110 printer driver for the Macintosh
* series of computers.
*/
/*
* Earle R. Horton.
* Wednesday, November 30, 1988
* All rights reserved.
*/
#include "Types.r"
/* This file's creator. */
#define Version "DMP-110 v1.0"
type 'Dmp1' {
pstring; /* String */
};
/* Print record resource file copy. */
type 'PREC' {
integer ; /* version */
/* prInfo */
byte;
byte; /* iDev */
integer ; /* iVres */
integer ; /* iHres */
rect ; /* rPage */
rect ; /* rPaper */
/* prStl */
integer ; /* wDev */
integer ; /* iPageV */
integer ; /* iPageH */
byte ; /* bPort */
byte ; /* feed */
/* prInfoPT */
byte;
byte; /* iDev */
integer ; /* iVres */
integer ; /* iHres */
rect ; /* rPage */
/* prXInfo */
integer ; /* iRowBytes */
integer ; /* iBandV */
integer ; /* iBandH */
integer ; /* iDevBytes */
integer ; /* iBands */
byte ; /* bPatScale */
byte ; /* bUlThick */
byte ; /* bUlOffset */
byte ; /* bUlShadow */
byte ; /* scan */
byte ; /* bXInfoX */
/* prJob */
integer ; /* iFstPage */
integer ; /* iLstPage */
integer ; /* iCopies */
byte ; /* bJDocLoop */
byte ; /* fFromUsr */
longint ; /* pIdleProc */
longint ; /* pFileName */
integer ; /* iFileVol */
byte ; /* bFileVers */
byte ; /* bJobX */
array [19]{ /* "Private" */
integer;
};
};
resource 'ICN#' (128, "DMP-110") {
{ /* array: 2 elements */
/* [1] */
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 007F 8000"
$"0040 C000 0040 A000 0040 9000 0040 F800"
$"0040 0800 0040 0800 0040 0800 0040 0800"
$"0040 0800 0040 0800 03FF FFC0 04AA AC20"
$"04D5 55A0 04AA ADA0 027F F840 0200 0040"
$"01FF FF80 0008 0400 0008 0400 0008 0400"
$"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A",
/* [2] */
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 007F 8000"
$"007F C000 007F E000 007F F000 007F F800"
$"007F F800 007F F800 007F F800 007F F800"
$"007F F800 007F F800 03FF FFC0 07FF FFE0"
$"07FF FFE0 07FF FFE0 03FF FFC0 03FF FFC0"
$"01FF FF80 0008 0400 0008 0400 0008 0400"
$"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A"
}
};
resource 'FREF' (128) {
'PRER',
0,
""
};
resource 'Dmp1' (0) {
Version
};
resource 'BNDL' (128) {
'Dmp1',
0,
{
'ICN#',
{
0, 128
},
'FREF',
{
0, 128
}
}
};
data 'HEXA' (-8192, "Printer Settings") {
$"0001 0002 0000 "
};
resource 'STR ' (-4092, "Right Button") {
"Modem"
};
resource 'STR ' (-4093, "Left Button") {
"Printer"
};
resource 'STR ' (-4091, "List label") {
"Select Speed and Click on a Port."
};
resource 'STR ' (-8191, "Spool File Name") {
"Print File"
};
resource 'DITL' (-8191,"Job dialog tempplate") {
{
{8, 321, 28, 381},
Button {
enabled,
"OK"
},
{9, 395, 29, 455},
Button {
enabled,
"Cancel"
},
{6, 6, 23, 127},
StaticText {
disabled,
Version
},
{30, 5, 46, 89},
StaticText {
disabled,
"Page Range:"
},
{30, 93, 45, 138},
RadioButton {
enabled,
"All"
},
{30, 140, 46, 200},
RadioButton {
enabled,
"From:"
},
{30, 205, 46, 237},
EditText {
disabled,
""
},
{30, 242, 46, 270},
StaticText {
disabled,
"To:"
},
{30, 272, 46, 304},
EditText {
disabled,
""
},
{55, 5, 71, 89},
StaticText {
disabled,
"Copies:"
},
/* [11] */
{55, 95, 71, 127},
EditText {
disabled,
"1"
},
{55, 145, 71, 200},
StaticText {
disabled,
"Feed:"
},
{55, 205, 70, 303},
RadioButton {
enabled,
"Continuous"
},
{55, 305, 71, 425},
RadioButton {
enabled,
"Sheet Feed"
}
}
};
resource 'DITL' (-8192, "Style Dialog Template") {
{
{44, 390, 64, 450},
Button {
enabled,
"OK"
},
{10, 390, 30, 450},
Button {
enabled,
"Cancel"
},
{10, 4, 30, 124},
StaticText {
disabled,
"DMP-110 v1.0"
},
{37, 66, 53, 120},
StaticText {
disabled,
"Style:"
},
{0, 0, 0, 0},
UserItem {
enabled
}
}
};
resource 'DITL' (-8190, "Next Page Template") {
{
{30, 60, 46, 140},
Button {
enabled,
"Done"
},
{30, 160, 46, 240},
Button {
enabled,
"Stop"
},
{8, 8, 24, 120},
StaticText {
enabled,
Version
},
{8, 120, 24, 265},
StaticText {
enabled,
"Insert Next Sheet"
}
}
};
resource 'DLOG' (-8191,"Job Dialog") {
{52, 16, 136, 492},
dBoxProc,
invisible,
noGoAway,
0x1,
-8191,
"Job"
};
resource 'ICON' (-4080, "DMP-110") {
$"0000 0000 0000 0000 0000 0000 0000 0000"
$"0000 0000 0000 0000 0000 0000 007F 8000"
$"0040 C000 0040 A000 0040 9000 0040 F800"
$"0040 0800 0040 0800 0040 0800 0040 0800"
$"0040 0800 0040 0800 03FF FFC0 04AA AC20"
$"04D5 55A0 04AA ADA0 027F F840 0200 0040"
$"01FF FF80 0008 0400 0008 0400 0008 0400"
$"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A"
};
resource 'DLOG' (-8192,"Style Dialog") {
{30, 20, 113, 488},
dBoxProc,
invisible,
noGoAway,
0x1,
-8192,
"Stl"
};
resource 'DLOG' (-8190, "Next Page Box") {
{48, 51, 100, 330},
dBoxProc,
-1,
noGoAway,
0x0,
-8190,
"Next Page"
};
/*
* This Print Record provides 60 dpi in the printing portRect as
* seen by the application, and scales the image up to 120 dpi.
* It is useful in scaling up BitMaps to double the image size, or
* in word processing applications where text justification is
* needed.
*/
resource 'PREC' (0,"Default Scale") {
3,
0,
0,
60,
60,
{0, 0, 630, 480},
{-15, -15, 645, 495},
512,
1320,
1020,
0,
1,
0,
0,
120,
120,
{0, 0, 1260, 960},
/* TPrXInfo */
120, /* rowBytes */
64, /* vertical dots */
959, /* horizontal dots */
7680, /* size of bit image */
20, /* bands per page */
0, /* bPatScale */
1, /* bUlThick */
1, /* bUlOffset */
1, /* bUlShadow */
0, /* scanTB */
0, /* unused */
1,
9999,
1,
0,
1,
0,0,
0,0,
0,
{
0,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
/*
* The printing code puts a copy of the last-used
* Print Record here.
*/
resource 'PREC' (1,"Last Used Print Record") {
3,
0,
0,
80,
80,
{0, 0, 840, 640},
{-20, -20, 860, 660},
512,
1320,
1020,
0,
1,
0,
0,
120,
120,
{0, 0, 1260, 960},
/* TPrXInfo */
120, /* rowBytes */
64, /* vertical dots */
959, /* horizontal dots */
7680, /* size of bit image */
20, /* bands per page */
0, /* bPatScale */
1, /* bUlThick */
1, /* bUlOffset */
1, /* bUlShadow */
0, /* scanTB */
0, /* unused */
1,
9999,
1,
0,
1,
0,0,
0,0,
0,
{
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
/*
* This Print Record causes a drawing program to reduce an object-
* oriented drawing by 33%, and allows us to fit a larger image
* on a single letter-sized sheet of paper. If the application
* does not check the prStl.iPageV and prStl.iPageH fields, then
* the results are exactly the same as produced by "Exact BitMap."
*/
resource 'PREC' (2,"Shrink To Fit") {
3,
0,
0,
80,
80,
{0, 0, 1280, 960},
{-20, -30, 1300, 990},
512,
1980,
1530,
0,
1,
0,
0,
80,
80,
{0, 0, 1280, 960},
/* TPrXInfo */
120, /* rowBytes */
64, /* vertical dots */
959, /* horizontal dots */
7680, /* size of bit image */
20, /* bands per page */
0, /* bPatScale */
1, /* bUlThick */
1, /* bUlOffset */
1, /* bUlShadow */
0, /* scanTB */
0, /* unused */
1,
9999,
1,
0,
1,
0,0,
0,0,
0,
{
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
/*
* This Print Record reflects the actual size of the printed
* image in dots. There is a one-to-one correspondence between
* screen pixels and printed dots. Best to use for painting
* programs, but the printed image will be smaller than what is
* seen on the screen.
*/
resource 'PREC' (3,"Exact BitMap") {
3,
0,
0,
120,
120,
{0, 0, 1280, 960},
{-20, -30, 1300, 990},
512,
1320,
1020,
0,
1,
0,
0,
120,
120,
{0, 0, 1280, 960},
/* TPrXInfo */
120, /* rowBytes */
64, /* vertical dots */
959, /* horizontal dots */
7680, /* size of bit image */
20, /* bands per page */
0, /* bPatScale */
1, /* bUlThick */
1, /* bUlOffset */
1, /* bUlShadow */
0, /* scanTB */
0, /* unused */
1,
9999,
1,
0,
1,
0,0,
0,0,
0,
{
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
/*
* This Print Record gives a printing port resolution of 80 dpi,
* which is close to ImageWriter resolution and therefore close
* to what most Macintosh applications expect to see. The problem
* with this 'PREC' is that the final image is scaled by a non-integral
* factor, and so text justification in word processing programs
* fails by a few bits width.
*/
resource 'PREC' (4,"Compatible") {
3,
0,
0,
80,
80,
{0, 0, 840, 640},
{-20, -20, 860, 660},
512,
1320,
1020,
0,
1,
0,
0,
120,
120,
{0, 0, 1260, 960},
/* TPrXInfo */
120, /* rowBytes */
64, /* vertical dots */
959, /* horizontal dots */
7680, /* size of bit image */
20, /* bands per page */
0, /* bPatScale */
1, /* bUlThick */
1, /* bUlOffset */
1, /* bUlShadow */
0, /* scanTB */
0, /* unused */
1,
9999,
1,
0,
1,
0,0,
0,0,
0,
{
4,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
resource 'STR#' (-4080, "Baud Rates") {
{
"300",
"600",
"1200",
"1800",
"2400",
"3600",
"4800",
"7200",
"9600",
"19200",
"57600"
}
};
resource 'DITL' (-4078, "ATalk Items") {
{
{139, 121, 159, 181},
Button {
enabled,
"OK"
},
{54, 11, 125, 294},
StaticText {
enabled,
"This printer cannot use the printer port now "
"because AppleTalk is active. Please either "
"turn off AppleTalk, use the modem port "
"instead, or choose another printer."
},
{9, 235, 41, 267},
Icon {
enabled,
-4080
}
}
};
resource 'DITL' (-4079, "Sys41 Items") {
{
{90, 137, 110, 197},
Button {
enabled,
"OK"
},
{56, 21, 76, 308},
StaticText {
enabled,
"This Printer requires System 4.1 or newer!"
},
{11, 274, 43, 306},
Icon {
enabled,
-4080
}
}
};
resource 'ALRT' (-4079, "Sys41Alert") {
{40, 36, 164, 370},
-4079,
{
OK, visible, sound1,
OK, visible, sound1,
OK, visible, sound1,
OK, visible, sound1
}
};
resource 'ALRT' (-4078, "ATalk is on!") {
{48, 38, 216, 342},
-4078,
{
OK, visible, sound1,
OK, visible, sound1,
OK, visible, sound1,
OK, visible, sound1
}
};